/*
 * camera_parameter.h
 *
 *  Created on: 2023年2月16日
 *      Author: Lw
 */

#ifndef SRC_CAMERA_CAMERA_PARAMETER_H_
#define SRC_CAMERA_CAMERA_PARAMETER_H_

#include "xil_types.h"

#define PL_UART_ONE							1
#define PL_UART_TWO							2

#define CAM_MSG_LEN							112
#define CAM_CONNECT_LEN						49

#define CCR_INDEX							17
#define CCV_INDEX							18
#define CCI_INDEX							20
#define CLE_INDEX							22
#define CCC_INDEX							24

#define CCP1_INDEX							25
#define CCP2_INDEX							26
#define CCP3_INDEX							27
#define CCP4_INDEX							28
#define CCP5_INDEX							29
#define CCP6_INDEX							30
#define CCP7_INDEX							31

#define CCP8_INDEX							32
#define CCP9_INDEX							33
#define CCP10_INDEX							34
#define CCP11_INDEX							35
#define CCP12_INDEX							36
#define CCP13_INDEX							37
#define CCP14_INDEX							38
#define CCP15_INDEX							39
#define CCP16_INDEX							40
#define CCP17_INDEX							41
#define CCP18_INDEX							42
#define CCP19_INDEX							43
#define CCP20_INDEX							44
#define CCP21_INDEX							45
#define CCP22_INDEX							46
#define CCP23_INDEX							47

#define CCI0_INDEX							16
#define CCI1_INDEX							17
#define CCI2_INDEX							18
#define CCI3_INDEX							19
#define CCI4_INDEX							20
#define CCI5_INDEX							21
#define CCI6_INDEX							22
#define CCI7_INDEX							23
#define CCI8_INDEX							24
#define CCI9_INDEX							25
#define CCI10_INDEX							26
#define CCI11_INDEX							27
#define CCI12_INDEX							28
#define CCI13_INDEX							29
#define CCI14_INDEX							30
#define CCI15_INDEX							31

#define CCI16_INDEX							32
#define CCI17_INDEX							33
#define CCI18_INDEX							34
#define CCI19_INDEX							35
#define CCI20_INDEX							36
#define CCI21_INDEX							37
#define CCI22_INDEX							38
#define CCI23_INDEX							39
#define CCI24_INDEX							40
#define CCI25_INDEX							41
#define CCI26_INDEX							42
#define CCI27_INDEX							43
#define CCI28_INDEX							44
#define CCI29_INDEX							45
#define CCI30_INDEX							46
#define CCI31_INDEX							47

#define CCI32_INDEX							48
#define CCI33_INDEX							49
#define CCI34_INDEX							50
#define CCI35_INDEX							51
#define CCI36_INDEX							52
#define CCI37_INDEX							53
#define CCI38_INDEX							54
#define CCI39_INDEX							55
#define CCI40_INDEX							56
#define CCI41_INDEX							57
#define CCI42_INDEX							58
#define CCI43_INDEX							59
#define CCI44_INDEX							60
#define CCI45_INDEX							61
#define CCI46_INDEX							62
#define CCI47_INDEX							63

/*  通用指令B格式 ,CCR(Camera Control Request),CCC(Camera Control Command),CCP(Camera Control Parameter),CLE(Camera Control Length)
 * CCI: Camera Control Index(wIndex), CSI: Camera Statu Information
 *
 *  XX  XX   XX    XX    07    00    00    00    71    77    00    00    22    33    EE    AA
 *  00  CCR  CCV   00    CCI   00    CLE   00    CCC   CCP1  CCP2  CCP3  CCP4  CCP5  CCP6  CCP7
 * CCP8 CCP9 CCP10 CCP11 CCP12 CCP13 CCP14 CCP15 CCP16 CCP17 CCP18 CCP19 CCP20 CCP21 CCP22 CCP23
 * 00   00    00     00   00     00   00    00    00   00    00    00    00     00    00    00
 * 00   00    00     00   00     00   00    00    00   00    00    00    00     00    00    00
 * 00   00    00     00   00     00   00    00    00   00    00    00    00     00    00    00
 * 00   00    00     00   00     00   00    00    00   00    00    00    XX     XX    XX    XX
 *
 * */


/*相机程序跳转到用户程序，连接相机*/
static u8 CONNECT_1[48] =
	{
		0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x81,0x88,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x01,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00
	};

/*复位相机内部寄存器*/
static u8 CONNECT_2[48] =
	{
		0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x81,0x88,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x02,0x00,0x00
	};

/* 断开Cameralink连接 */
static u8 DISCONNECT[48] =
	{
		0x04,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x81,0x88,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFD,0x02,0x00,0x00
	};


/* 相机初始化 ,连续拍照模式 16bit,正常输出模式; CCR(Camera Control Request)=0xD1,CCC(Camera Control Command)=0xA0,
 * CCP1(Camera Control Parameter)=0,CCP6=0,CLE(Camera Control Length)=0x10,初始化时间需要5-6s
 * */
static u8 A0[112] =
	{
		0xA0,0xA0,0xA0,0xA0,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0xA0,0xA0,0xA0
	};


/*相机初始化 ,单拍模式 16bit,正常输出模式; CCR=0xD1,CCC=0xA0,CCP1=1,CCP6=0
 * CCP6
 * 0:16bit 正常输出模式
 * 3:16bit 2CMS输出模式
 * */
/*
static u8 A1[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xA0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x04,0x00,0x00
	};

*/

/*曝光时间设置CCR=0xD1,CCC=0xA3，CCP1..4 32BIT的曝光时间，单位为微秒 CCP1=MSB CCP4=LSB
 * 默认曝光时间为1s
 * */
static u8 A3[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xA3,0x00,0x0F,0x42,0x40,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCF,0x04,0x00,0x00
	};


/*
 * 配置增益 默认增益为8
 CCP1..2 Analog Gain R CCP1=MSB CCP2=LSB
 CCP3..4 Digital Gain R CCP3=MSB CCP4=LSB
 CCP5..6 Analog Gain G CCP5=MSB CCP6=LSB
 CCP7..8 Digitial Gain G CCP7=MSB CCP8=LSB
 CCP9..10 Analog Gain B CCP9=MSB CCP10=LSB
 CCP11.12 Digital Gain B CCP11=MSB CCP12=LSB
 **/
static u8 A4[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xA4,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7A,0x04,0x00,0x00
	};


/* 启动拍摄命令 ，CCP1 0X00: 在单帧模式下，启动一帧的拍摄。 在连续模式下，会清空相机DDR并且重新开始一次连续视频序列 */
/*
static u8 A6[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xA6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7A,0x04,0x00,0x00
	};
*/

/*设置图像位数
 * CCC=0XA7
 * CCP1=0 8BIT
 * CCP1=1 16BIT
 * */
static u8 A7[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xA7,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x04,0x00,0x00
	};


/*设置图像OFFSET
 * CCC=0XA8
offset设置
CCP1..2 OFFSET1 R CCP1=MSB CCP2=LSB
CCP3..4 OFFSET1 G CCP3=MSB CCP4=LSB
CCP5..6 OFFSET1 B CCP5=MSB CCP6=LSB
CCP7..8 OFFSET2 R CCP7=MSB CCP8=LSB
CCP9..10 OFFSET2 G CCP9=MSB CCP10=LSB
CCP11..12 OFFSET2 B CCP11=MSB CCP12=LSB
 **/
static u8 A8[112] =
	{
		0xA8,0xA8,0xA8,0xA8,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xA8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x04,0x00,0x00
	};


/*测试图像配置
 * CCC=0XB3 CL 选项配置
 *
CCP1:CL 测试图像配置
	0:正常模式
   	1:固定序列LVDS
	2:渐变测试图像
CCP2:CL full medium模式选择
	0:CL FULL
	1:CL MEDIUM
	测试图像首先需要初始化相机，同时设置相机为16bit模式，并且设置数字增益参数为8
 * */
static u8 B3[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xD1,0x00,0x00,0x00,0x00,0x10,0x00,0xB3,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x04,0x00,0x00
	};



/*CCR=0XD2 将一次性返回所有相机当前的相关信息*/
static u8 D2[112] =
	{
		0xD2,0xD2,0xD2,0xD2,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xD2,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD2,0xD2,0xD2,0xD2
	};


/*CCR=0XD5,CCI=0X04,相机信息查询*/
static u8 D504[112] =
	{
		0xD5,0xD5,0xD5,0xD5,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xD5,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x09,0x10,0x11,0x12,0x09,0x10,0x11,0x12,0x09,0x10,0x11,0x12,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xD5,0xD5,0xD5
	};


/*CCR=0XD5,CCI=0X0E,获取相机的与精确曝光计算相关的数据，比如LinePeriod等*/
/*
static u8 D50E[112] =
	{
		0xD5,0xD5,0xD5,0xD5,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xD5,0x00,0x00,0x0E,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x09,0x10,0x11,0x12,0x09,0x10,0x11,0x12,0x09,0x10,0x11,0x12,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xD5,0xD5,0xD5
	};
*/



/* 复位FPGA DDR3 控制器 */
static u8 B901[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xB9,0x00,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA7,0x03,0x00,0x00
	};

/* 复位CMOS */
static u8 B902[112] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0xB9,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA6,0x03,0x00,0x00
	};

/* SET IDLE */
static u8 B9_SET_IDLE[112] =
    {
        0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xB9,0x00,0x00,0x23,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC9,0x03,0x00,0x00
    };
/* RELESE IDLE */
static u8 B9_RELEASE_IDLE[112] =
    {
        0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xB9,0x01,0x00,0x23,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA7,0x03,0x00,0x00
    };

/* 使能burst mode */
static u8 B910[112] =
    {
        0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xB9,0x01,0x00,0x39,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x03,0x00,0x00
    };

/* 设置开始拍摄帧序号, 向FPGA内部寄存器0x32 写1 */
static u8 B911[112] =
    {
        0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xB9,0x01,0x00,0x32,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD8,0x03,0x00,0x00
    };

/*
 * 设置结束拍摄帧序号, 向FPGA内部寄存器0x33 写XH(帧结束序号高8位） ；向FPGA内部寄存器0x34写XL,
 * 结束帧序号=XH*256+XL
 * 拍摄帧数=结束帧序号-开始帧序号
 * B912写XH
 * B913写XL
 */
static u8 B912[16*7] =
    {
        0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xB9,0x00,0x00,0x33,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDA,0x03,0x00,0x00
    };

static u8 B913[16*7] =
    {
        0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
        0x00,0xB9,0x03,0x00,0x34,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDD,0x03,0x00,0x00
    };


static u8 RecvSuccess[16*7] =
	{
		0x01,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x71,0x77,0x00,0x00,0x22,0x33,0xEE,0xAA,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x00,0xFF,0xEE,0xDD,0xCC,0xBB,0xAA,0x99,0x88,0x77,0x66,0x55,0x44,0x33,0x22,0x11
	};




#endif /* SRC_CAMERA_PARAMETER_H_ */
